package customize

import (
	"gitcode.com/G-YT/baoyou/server/global"
	"gitcode.com/G-YT/baoyou/server/model/user"
)

// AssessRecord 评估记录模型
type AssessRecord struct {
	global.GvaModel
	UID                     uint      `json:"uid" gorm:"column:uid;comment:用户ID;not null"`
	AppraiseImages          string    `json:"appraiseImages" gorm:"column:appraise_images;comment:评估图像数据(原始JSON字符串);type:text"`
	AppraiseTypeId          int       `json:"appraiseTypeId" gorm:"column:appraise_type_id;comment:评估类型ID;not null"`
	AppraiseTypeCode        string    `json:"appraiseTypeCode" gorm:"column:appraise_type_code;comment:评估类型代码;size:50"`
	ClearBackgroundStatus   int       `json:"clearBackgroundStatus" gorm:"column:clear_background_status;comment:清除背景状态 1清除 2不清除;default:2"`
	ReportPrivacyFaceStatus int       `json:"reportPrivacyFaceStatus" gorm:"column:report_privacy_face_status;comment:报告隐私面部状态;default:1"`
	Version                 string    `json:"version" gorm:"column:version;comment:版本号;size:20"`
	Platform                string    `json:"platform" gorm:"column:platform;comment:平台标识;size:50"`
	MbName                  string    `json:"mbName" gorm:"column:mb_name;comment:客户姓名;size:50;not null"`
	MbTell                  string    `json:"mbTell" gorm:"column:mb_tell;comment:客户电话;size:20;not null"`
	MbSex                   int       `json:"mbSex" gorm:"column:mb_sex;comment:客户性别 1男 0女"`
	Birthday                string    `json:"birthday" gorm:"column:birthday;comment:出生日期;size:20"`
	Kg                      float64   `json:"kg" gorm:"column:kg;comment:体重(kg);not null"`
	Cm                      float64   `json:"cm" gorm:"column:cm;comment:身高(cm);not null"`
	Waistline               float64   `json:"waistline" gorm:"column:waistline;comment:腰围(cm);not null"`
	Hipline                 float64   `json:"hipline" gorm:"column:hipline;comment:臀围(cm);not null"`
	Details                 string    `json:"details" gorm:"column:details;comment:评估详情(原始JSON字符串);type:text"`
	Age                     uint      `json:"age" gorm:"column:age;comment:年龄"`
	Customer                user.User `json:"customer" gorm:"foreignKey:UID;references:ID"` // 关联客户表
}

func (AssessRecord) TableName() string {
	return "by_image_assess_record"
}
